AUX PXI

  • Is not a NI (National Instruments) HW, it is a Beckhoff PC: C5210-0040 series (due to big waiting lists at NI)

  • It could be replaced by NI hardware, but is not as easy as replacing the AXEs one, this one may require some changes inside the cabinet to make room for it.

Compiled code

The code generated by the AuxSystemsController.lvproj must be copied to the /c/ni-rt/startup directory.

The content of /c/ni-rt/startup directory should look like this:

admin@AuxSystems:/c/ni-rt/startup# ls -lh
total 30996
lrwxrwxrwx    1 admin    administ      22 Apr 25  2020 README_File_Paths.txt -> /README_File_Paths.txt
drwxrwxr-x    2 admin    administ    4.0K Dec  5 18:46 data/
drwxrwxr-x    3 admin    administ    4.0K Dec  5 18:46 project/
-rw-r--r--    1 admin    administ     101 Dec 13 09:56 startup.aliases
-rw-r--r--    1 admin    administ   30.3M Dec 13 09:56 startup.rtexe
admin@AuxSystems:/c/ni-rt/startup#

Configuration files

This section explains the location and which are the configuration files needed for this PXI. All the same structure, the main configuration files are stored in the /c/Configuration directory, here some are then inside other directories to make things more clear. But each of them contains the specific configuration files for the code running in it.

AUX PXI /c/Configuration contents:

admin@AuxSystems:/c/Configuration# ls -lR
.:
total 32
drwxrwxrwx    2 admin    administ      4096 Jul 12  2022 CAR_TCP/
drwxr-xr-x    2 admin    administ      4096 Jul 12  2022 DiscreteStateReporting/
drwxrwxrwx    2 admin    administ      4096 Jul 12  2022 ModbusTemperatureControllers/
drwxrwxrwx    2 admin    administ      4096 Sep 13 13:06 OSS/
drwxr-xr-x    2 admin    administ      4096 Sep 21 08:34 TEC/
-rwxr-xr-x    1 admin    administ       434 May  4 12:20 TMA_PXI_RT_MainConfig.ini*
drwxr-xr-x    2 admin    administ      4096 Jul 12  2022 TekNSVs/
drwxrwxrwx    2 admin    administ      4096 Dec 19  2022 TelemetryConfig/

./CAR_TCP:
total 4
-rwxr-xr-x    1 admin    administ       574 Nov 18  2022 CommandTCP_Config.xml*

./DiscreteStateReporting:
total 4
-rwxr-xr-x    1 admin    administ       387 Nov 10  2022 DiscreteStateReporting.json*

./ModbusTemperatureControllers:
total 40
-rwxr-xr-x    1 admin    administ       142 May  4 07:07 TMA_AX_DZ_CBT_0001_config.ini*
-rwxr-xr-x    1 admin    administ       839 Oct 11  2022 TMA_AX_DZ_CBT_0001_mapping.txt*
-rwxr-xr-x    1 admin    administ       142 May  4 07:07 TMA_AZ_PD_CBT_0001_config.ini*
-rwxr-xr-x    1 admin    administ       839 Oct 11  2022 TMA_AZ_PD_CBT_0001_mapping.txt*
-rwxr-xr-x    1 admin    administ       142 May  4 07:07 TMA_AZ_PD_TRM_0001_config.ini*
-rwxr-xr-x    1 admin    administ       839 Oct 11  2022 TMA_AZ_PD_TRM_0001_mapping.txt*
-rwxr-xr-x    1 admin    administ       142 May  4 07:07 TMA_EL_PD_CBT_0001_config.ini*
-rwxr-xr-x    1 admin    administ       839 Oct 11  2022 TMA_EL_PD_CBT_0001_mapping.txt*
-rwxr-xr-x    1 admin    administ       142 May  4 07:07 TMA_EL_PD_CBT_0002_config.ini*
-rwxr-xr-x    1 admin    administ       839 Oct 11  2022 TMA_EL_PD_CBT_0002_mapping.txt*

./OSS:
total 120
-rwxr-xr-x    1 admin    administ     58800 Sep 13 13:06 OSS_AdditionalFaultMonitoring.json*
-rwxr-xr-x    1 admin    administ       645 Sep 13 13:06 OSS_CabinetTemperatureMonitoring.json*
-rwxr-xr-x    1 admin    administ     38800 Sep 13 13:06 OSS_ModBusMapping.txt*
-rwxr-xr-x    1 admin    administ     14663 Sep 13 13:06 OSS_ModBusMapping_ForReadWriteDefinition.txt*
-rwxr-xr-x    1 admin    administ       128 May 11 14:42 ServerConfig.ini*

./TEC:
total 44
-rwxr-xr-x    1 admin    administ       127 Sep 14 11:07 ServerConfig.ini*
-rwxr-xr-x    1 admin    administ     13115 Sep 14 11:07 TEC_ModBusMapping.txt*
-rwxr-xr-x    1 admin    administ      5437 Sep 14 11:07 TEC_ModBusMapping_ForReadWriteDefinition.txt*
-rwxr-xr-x    1 lvuser   ni           14707 Sep 21 07:41 TopEndChillerCommandsAndMonitoringConfig.json*

./TekNSVs:
total 68
-rwxr-xr-x    1 admin    administ       575 Nov 18  2022 ReceiverConfig.xml*
-rwxr-xr-x    1 admin    administ     55983 Jul 12  2022 TekNSVvariablesToCreate.json*
-rwxr-xr-x    1 admin    administ       544 Jul 12  2022 VariablesToSubscribe.json*
-rwxr-xr-x    1 admin    administ       671 May  4 09:56 VariablesToSubscribeClientConfig.xml*

./TelemetryConfig:
total 32
-rwxr-xr-x    1 admin    administ     31809 May  4 09:28 TelemetryConfig.ini*
admin@AuxSystems:/c/Configuration#

Now each of the files is explained:

  • TMA_PXI_RT_MainConfig.ini: This file is automatically created if not existent, is used to define the general configuration. If empty the default values are used, this is the way it is created if nonexistent at boot.

  • ./CAR_TCP/CommandTCP_Config.xml: This file is necessary at boot, here the configuration for the TCP server used to communicate with the MtMountOperationManager is specified. If not found at boot the code won’t startup.

  • ./DiscreteStateReporting/DiscreteStateReporting.json: This file is necessary at boot, here the configuration for the discrete state reporting task is specified. If not found the system will start but it won’t be managing the events properly, so duplicated events for the CSC could appear.

  • ./ModbusTemperatureControllers/cabinetName_config.ini: This file is necessary at boot, here the configuration for the modbus communication for each temperature controller is specified. If not found at boot the code for the modbus controllers won’t startup.

  • ./ModbusTemperatureControllers/cabinetName_mapping.txt: This file is necessary at boot, here the configuration for the modbus mapping (shared variables between the PXI and the temperature controllers) is defined. If not found at boot the code won’t startup.

  • ./OSS/OSS_AdditionalFaultMonitoring.json: This file is necessary at boot, this file defines which variables are read for obtaining the detailed alarm list from the OSS system. Each variable has a list of bit in array format, this string values will be sent when the corresponding bit is active.

  • ./OSS/OSS_CabinetTemperatureMonitoring.json: This file is necessary at boot, this file defines which variables are read for monitoring the temperature of the OSS cabinets. It also defines under which names are published to the event system.

  • ./OSS/OSS_ModBusMapping.txt: This file is necessary at boot, here the configuration for the OSS modbus mapping (shared variables between the PXI and the OSS) is defined. If not found at boot the code won’t startup.

  • ./OSS/OSS_ModBusMapping_ForReadWriteDefinition.txt: This file is necessary at boot, here the configuration for the OSS variables inside the PXI is defined. If not found at boot the code won’t startup.

  • ./OSS/ServerConfig.ini: This file is necessary at boot, here the configuration for the modbus communication is specified. If not found at boot the code won’t startup.

  • ./TEC/ServerConfig.ini This file is necessary at boot, here the configuration for the modbus communication is specified. If not found at boot the code won’t startup.

  • ./TEC/TEC_ModBusMapping.txt This file is necessary at boot, here the configuration for the TEC modbus mapping (shared variables between the PXI and the TEC) is defined. If not found at boot the code won’t startup.

  • ./TEC/TEC_ModBusMapping_ForReadWriteDefinition.txt: This file is necessary at boot, here the configuration for the TEC variables inside the PXI is defined. If not found at boot the code won’t startup.

  • ./TEC/TopEndChillerCommandsAndMonitoringConfig.json: This file is necessary at boot, here the commands TEC behavior is coded, a full explanation of the file can be found here

  • ./TekNSVs/ReceiverConfig.xml: This file is necessary at boot, here the configuration for the TCP server that sends the TekNSV variables to the EUI is specified. If not found at boot the code won’t startup.

  • ./TekNSVs/TekNSVvariablesToCreate.json: This file is necessary at boot, this file defines the TekNSV variables to create just after starting the server, this prevents errors at boot in the EUI when launched too early. If not found at boot the code won’t startup.

  • ./TekNSVs/VariablesToSubscribe.json: This file is necessary at boot, this file defines the TekNSV variables to read from the TMA PXI. If not found at boot the code won’t startup.

  • ./TekNSVs/VariablesToSubscribeClientConfig.xml: This file is necessary at boot, here the configuration for the TCP client to connect to the TekNSV server in the TMA PXI is defined. If not found at boot the code won’t startup.

  • ./TelemetryConfig/TelemetryConfig.ini: This file is necessary at boot, this file defines the input signals to read from the TMA PXI and the TekNSV variables to be published. If not found at boot the code won’t startup.

The default configuration for all the necessary files listed here can be found in this repo inside the ESIFiles directory.

TMA_PXI_RT_MainConfig

As this is the one that has the general information a specific section is created. This file can have multiple sections, as a *.ini file, it uses [sectionName] to divide the file.

  • log section: here the configuration for the logging is defined.

    • Path: the absolute path for the log files, it needs to have a main file name, a date is going to be added to it. Default value: /home/lvuser/log/MainLogFile.log

    • Active: a boolean “FALSE”/“TRUE” to disable/enable the logging. Default value: “TRUE”.

    [Log]
    Path = "/home/lvuser/log/AuxTMA.log"
    Active = "TRUE"
    
  • Settings Database section: here the configuration for connecting to the database is defined.

    • IP: the ip for the MCC machine that contains the database. Default: “192.168.209.200”

    • Port: the port to connect to the database. Default: 3306

    • Timeout: the timeout for the connect in ms. Default: 500

    • ReadTimeout: the timeout for reading from the database in ms. Default: 500

    • UserName: the user name to connect to the database. Default: “root”

    • Password: the password to connect to the database. The default is the password for connecting to the database.

    • DataBase: the name of the database to connect to. Default: “lsst_settings”

    [Settings Database]
    IP = "192.168.209.200"
    Port = 3306
    Timeout = 500
    ReadTimeout = 500
    UserName = "root"
    Password = "defaultPasswordValue"
    DataBase = "lsst_settings"
    
  • IPs section: here the IPs for connecting to the different device targets are defined.

    • tmaPxiIp: specify the IP of the TMA PXI here, if not defined the default value will be used. Default: 192.168.209.10.

    • auxPxiIp: specify the IP of the AUX PXI here, if not defined the default value will be used. Default: 192.168.209.11.

    • axesPxiIp: specify the IP of the AXES PXI here, if not defined the default value will be used. Default: 192.168.213.11.

    • tmaIsIp: specify the IP of the TMA IS (safety PLC CPU module) here, if not defined the default value will be used. Default: 192.168.180.10.

    • mcc: specify the IP of the MCC here, if not defined the default value will be used. Default: 192.168.209.200.

    [IPs]
    tmaPxiIp = 139.229.171.3
    auxPxiIp = 139.229.171.4
    axesPxiIp = 139.229.171.26
    tmaIsIp = 192.168.180.10
    mcc = 139.229.171.6
    

Libraries

The shared libraries (SO) used by the code must be stored in /usr/local/lib.

TMA PXI /usr/local/lib contents:

admin@AuxSystems:/usr/local/lib# ls -l
total 15588
-rwxr-xr-x    1 admin    administ   7397619 Jul 12 10:46 32libmysqlclient.so*
-rwxr-xr-x    1 admin    administ   8538815 Jul 12 10:46 64libmysqlclient.so*
-rwxr-xr-x    1 admin    administ     11128 Jul 12 10:46 libGetClocks.so*
-rwxr-xr-x    1 admin    administ      7824 Jul 12 10:46 lvimptsl.so*
admin@AuxSystems:/usr/local/lib#